extract only year from date python

28

extract only year from date python -

df['year'] = pd.DatetimeIndex(df['date']).year

Comments

Submit
0 Comments